package fun.tan90.device.transfer.plugin.config;

import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * 系统内置函数
 * {
 * "type": "date",
 * "jpath": "$.ts",
 * "varName": "ts",
 * "defaultVal": "expr:_sys.date()",
 * "formatExpr": "_sys.format(ts, \"yyyy-MM-dd HH:mm:ss\")"
 * }
 */
public class BuiltInSys {

    public static Date date() {
        return DateUtil.date();
    }

    public static String format(Date date, String format) {
        return DateUtil.format(date, format);
    }
}
